-
-
Notifications
You must be signed in to change notification settings - Fork 240
feat(Http): can optionally fetch local resources from app bundle with Http #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Http): can optionally fetch local resources from app bundle with Http #286
Conversation
This now has tests with helpful mocks 👍
As far as any debate around "is it right to allow Http module to request local files"... the main question is does Http allow local files to be requested from a web server, and the answer is _Yes_. That’s how web devs see it... If a file is in their web app and it can be requested via XMLHttpRequest, which it can, the same expectation will be brought to their approach to {N}... they will want to be able to intutively request files from their app with Http. This was one of those things when I started with nativescript-angular, I just expected to work and didn’t understand why it didnt... since i am a hardened web dev.
Outside of those logical reasons... it is just convenient sugar... and devs love sugar... it’s what makes for a happier dev experience imo.
This PR also fixes the new error occuring for some folks with latest that's in rc2 and rc3 with Http
ORIGINAL EXCEPTION: Error: not implemented
ORIGINAL STACKTRACE:
Error: not implemented
at NativeScriptDomAdapter.Parse5DomAdapter.getCookie (/data/data/org.nativescript.nativescriptweather/files/app/tns_modules/@angular/platform-server/src/parse5_adapter.js:612:68)
...ntics like Image component closes #249
👍
1 similar comment
👍
This provides a nice convenience for Angular developers; an easy way to fetch local files with
Httpfrom their app bundle just like they would local files in their web app using the same semantics as NativeScript XMLImagesrc property.... is now possible 👍